<!DOCTYPE html>
<html lang="en">
  <head>
    $shared/head()$
    <script>
    function validar(){ 
      if(!\$("input[name='idTurnoTemp']:checked").val()) {
        \$("#alert").show();
        return false;
      }
      return true;
    }

    function validarPaso2 (){ 
      if(\$("#observacion").val()=="") {
        \$("#alertObservacion").show();
        return false;
      }
      return true;
    }
    function irPaso2(){
        if (validar()){
          \$("#mostrarPaso").val("2");
          \$("#txtbuscar").val("");          
          \$("#idTurno").val(\$('input:radio[name=idTurnoTemp]:checked').val());
          \$("#myForm").submit();
        }
    }
    function terminar(){
        if (validarPaso2()){
          \$("#mostrarPaso").val("3");
          \$("#myForm").submit();
        }
    }
    
    function updateTextInput(idInput, val) {
          document.getElementById(idInput).value=val; 
    }
    </script>

    <script>
      \$(function(){
        \$(".panel-body").unhighlight().highlight("$txtbuscar$");
      });
    </script>
  </head>
  <body>
<div class="container">
$shared/header()$
    
    <div class="row">
        <div class="col-sm-3 col-md-3 sidebar">
            <span type="button" class="hidden-print">
    <span class="glyphicon glyphicon-user"></span> $usuarioConectado.Nombre$&nbsp;$usuarioConectado.Apellido$
  </span>
        $shared/menu()$
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-8 col-md-offset-0 main">
          <ol class="breadcrumb  hidden-print">
          <li><a href="home.aspx">Inicio</a></li>
          <li class="active">Cierre de Turno</li>
        </ol>
        <div class="text-right">
          <button type="button" class="btn btn-default btn-sm" onclick="window.print();">
          <span  class="glyphicon glyphicon-print" ></span> Imprimir
          </button>
        </div>

$if (mostrarExito)$
  <div class="alert alert-success" role="alert">La turno fue cerrado exitosamente!</div>
$endif$ 
<form method="POST" name="myForm" id="myForm">
  
<div id="paso2">
  <div class="alert alert-danger" id="alertObservacion" style="display:none">
      <a href="#" class="alert-link">Debe ingresar una observacion.</a>
    </div>
<div class="panel panel-default">
  <div class="panel-heading ">Reporte de Cierre de <b>$turno.Cajero.NombreCompleto$</b>.</div>
  <div class="panel-body">
      $tableHTML$
      <h3>Comentario <small>Observaci&oacute;n al Cierre</small></h3>
 <div class="form-group">
            <textarea class="form-control keyboard" placeholder="Ingrese un comentario" required rows=4 id="observacion" name="observacion" readonly="readonly">$turno.Cierre.Observacion$</textarea>
      </div>
      $shared/resumen_turno()$
      
      $shared/comentarios_turno()$

    <div class="visible-print text-right">
      <br/><br/>
        <table width="80%" align="right" >
          <tr>
            <td>
              _______________________________
            </td>
            <td>&nbsp;&nbsp;&nbsp;</td>
            <td>
              _______________________________
            </td>
            <tr>

            <td>
              Supervisor
            </td>
            <td>&nbsp;&nbsp;&nbsp;</td>
            <td>
              Cajero
            </td>
          </tr>
        </table>
      </div>
  </div>
  <div class="panel-footer"> 
            <a href="home.aspx" class="btn btn-primary" >Volver</a>
  </div>
  </div>
</div>
<input type="hidden" name="mostrarPaso" id="mostrarPaso" value="1">
<input type="hidden" name="idTurno"  id="idTurno" value="$turno.Id$">
</form>

      $shared/footer()$
      </div>
      </div>
      </div>
  </body>
</html> 